#include"RPGBox.hpp"

/*
The goal of this project is to create Scrolling text.
- have text move across the screen in bits.
- you need to be able to change the speed of the text speed.
- blue background for text ( like in jrpgs )
- you should be able to offset the rpg box.

*/
int main()
{
    //Init Rpg Functions:
    RPGBox Box;
    Box.Set_Position(300,500);
    Box.Set_Offset(8,4);
    Box.Set_Text("I am a Linux game devloper c:", 12);
    Box.Delay = 0.08f;
    // Create the main window
    sf::RenderWindow App(sf::VideoMode(800, 600), "RPG Text Box");

	// Start the game loop
    while (App.IsOpened())
    {
        // Process events
        sf::Event Event;
        while (App.GetEvent(Event))
        {
            // Close window : exit
            if (Event.Type == sf::Event::Closed)
                App.Close();
        }
        Box.Scroll_Text();
        // Clear screen
        App.Clear();

        // Draw the sprite
        App.Draw(Box.Sprite);
        App.Draw(Box.Text);
        // Update the window
        App.Display();
    }

    return EXIT_SUCCESS;
}
